package com.example.bsxk.dto;

public class BaseResponse {
    private String code;
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("BaseResponse{");
        sb.append("code='").append(code).append('\'');
        sb.append(", message='").append(message).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public static BaseResponse success(){
        BaseResponse baseResponse = new BaseResponse();
        baseResponse.setCode("0");
        baseResponse.setMessage("success");
        return baseResponse;
    }
    public static BaseResponse fail2001(){
        BaseResponse baseResponse = new BaseResponse();
        baseResponse.setCode("2001");
        baseResponse.setMessage("学生已被其他老师选定");
        return baseResponse;
    }
}
